package org.eclipse.milo.examples.server.config;
import com.typesafe.config.Config;

public class ConfigConstants {
    private static Config conf = null;

    public static int tcpBindPort;
    public static int httpsBindPort;
    public static String[] loginCount = null;
    public static String path_01 = null;
    public static String path_02 = "/milo/discovery";

    public static double timeInterval;

    public static int intType;
    public static int intStep;
    public static int intTop;

    public static int doubleType;
    public static double doubleStep;
    public static double doubleTop;

    public static int boolType;

    public static int stringType;
    public static int stringSize;

    static {
        ConfigManager.init();
        conf = ConfigManager.getConfig();

        tcpBindPort = conf.getInt("TCP_BIND_PORT");
        httpsBindPort = conf.getInt("HTTPS_BIND_PORT");
        loginCount = conf.getString("LOGINCOUNT").trim().split(" ");
        path_01 = conf.getString("PATH_01").trim();

        timeInterval = conf.getDouble("TIME_INTERVAL");

        intType = conf.getInt("INT_TYPE");
        intStep = conf.getInt("INT_STEP");
        intTop = conf.getInt("INT_TOP");

        doubleType = conf.getInt("DOUBLE_TYPE");
        doubleStep = conf.getDouble("DOUBLE_STEP");
        doubleTop = conf.getDouble("DOUBLE_TOP");

        boolType = conf.getInt("BOOL_TYPE");

        stringType = conf.getInt("STRING_TYPE");
        stringSize = conf.getInt("STRING_SIZE");
    }
}
